﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TimeTabling.Core;
using TimeTabling.DAL;
using TimeTabling.Core.Contracts;

namespace TimeTabling.Application
{
    public class CenterService : ICenterService
    {
        private string connectionString;
        
        public CenterService(string conString)
        {
            this.connectionString = conString;
        }
        public void AddCenter(Center center)
        {
            ICenterDAO centerDAO = new CenterDAO(connectionString);
            centerDAO.Add(center);
        }


        public Center GetCenter(Guid id)
        {
            ICenterDAO centerDAO = new CenterDAO(connectionString);
            return centerDAO.Get(id);
        }
    }
}
